﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Season.aspx.vb" Inherits="ExpWeb.Season" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="row">
        <div class="col-md-2">
            <h3>Season</h3>
        </div>
        <div class="col-md-10">
            <asp:Label ID="lblStatus" runat="server" Width="131px"></asp:Label>
        </div>
    </div>

    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">

            <div class="row" style="margin-bottom: 5px;">
                <div class="col-lg-4 col-lg-offset-4 text-right">
                    <asp:LinkButton ID="btn_Add" runat="server" CommandArgument="View2" CommandName="SwitchViewByID" CssClass="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Add</asp:LinkButton>
                </div>
            </div>

            <div class="row">
                <div class="col-lg-4 col-lg-offset-4">
                    <asp:GridView ID="gv_data" runat="server" AutoGenerateColumns="False" CssClass="table table-hover" GridLines="None">
                        <HeaderStyle ForeColor="White" Font-Bold="True" BackColor="#6B696B"></HeaderStyle>
                        <Columns>
                            <asp:BoundField DataField="Season_ID" ItemStyle-Width="40" Visible="false" />
                            <asp:TemplateField HeaderText="Edit">
                                <ItemStyle Width="40px" VerticalAlign="top" HorizontalAlign="Center" />
                                <HeaderTemplate>
                                    <center>Edit</center>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ToolTip="Edit" CommandName="edit" CommandArgument='<%#Eval("Season_ID")%>' ID="btnEdit">
                                    <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                                        </asp:LinkButton>
                                </ItemTemplate>

                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Delete">
                                <HeaderTemplate>
                                    <center>Delete</center>
                                </HeaderTemplate>
                                <ItemStyle Width="30px" VerticalAlign="top" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <asp:LinkButton runat="server" ToolTip="Delete" CommandName="Delete" CommandArgument='<%#Eval("Season_ID")%>' ID="btnDelete" OnClientClick="return confirm('Make sure, Delete this one?');">
                                    <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                                        </asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>
                                    <center>Season</center>
                                </HeaderTemplate>
                                <ItemStyle Width="90px" VerticalAlign="top" HorizontalAlign="Center" />
                                <ItemTemplate>
                                    <%# Eval("SeasonCode")%>
                                </ItemTemplate>
                            </asp:TemplateField>                          
                        </Columns>
                    </asp:GridView>
                </div>
            </div>

        </asp:View>

        <asp:View ID="View2" runat="server">
            
            <div class="col-lg-6 col-lg-offset-3">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <asp:Label ID="lblPanelHeader" runat="server" Text="Add/Edit Season"></asp:Label>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <asp:HiddenField ID="HDFieldSeasonID" runat="server" />
                            <div class="col-lg-12">
                                <div class="form-group">
                                    <label>Season Code :</label>
                                    <asp:TextBox ID="txtSeasonCode" runat="server" MaxLength="20" CssClass="form-control"></asp:TextBox>
                                </div>
                               
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        <asp:Button ID="btn_Save" runat="server" Text="SAVE" CssClass="btn btn-default" />&nbsp;
                        <asp:Button ID="btn_Cancel" runat="server" CommandArgument="View1" CommandName="SwitchViewByID" Text="Cancel" CssClass="btn btn-default" />
                    </div>
                </div>

            </div>
        </asp:View>

    </asp:MultiView>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="script" runat="server">
    <script type="text/javascript">
        ActiveMenuIndex(0);
    </script>
</asp:Content>